package com.linwen.javase.desgin_pattern.BigTalkDesignPattenJAVACode._17单例模式._3基本代码;

public class Test {

    public static void main(String[] args) {

        Singleton s1 = Singleton.getInstance();
        Singleton s2 = Singleton.getInstance();

        if (s1 == s2) {
            System.out.println("两个对象是相同的实例。");
        }

    }
}

